******************************************************************************

*choose working directory
cd "/Users/ecconnors/Desktop/"
use "study1.dta", clear

*survey weights
svyset [pw=teamweight]

******************************************************************************
* Analysis
******************************************************************************

*sample descriptives (appendix)
tab pid7
*drop those without partisan attachment
keep if partisanship == 1 | partisanship == 2 | partisanship == 3 | partisanship == 5 | partisanship == 6 | partisanship == 7
sum ideology
tab gender4
sum age
tab white

*general embarrassment levels
tab embarrassment [aw=teamweight]

*does condition matter? no
ologit embarrassment elite

*table 1 (main text)
*predicting general embarrassment, bivariate + weighted
svy: ologit embarrassment age 
svy: ologit embarrassment ib1.woman 
svy: ologit embarrassment white 
svy: ologit embarrassment education 
svy: ologit embarrassment interest 
svy: ologit embarrassment strength 
svy: ologit embarrassment democrat 
svy: ologit embarrassment ideology 
svy: ologit embarrassment knowledge 
*predicting peer embarrassment 
svy: ologit intra_peer age 
svy: ologit intra_peer ib1.woman 
svy: ologit intra_peer white 
svy: ologit intra_peer education 
svy: ologit intra_peer interest 
svy: ologit intra_peer strength 
svy: ologit intra_peer democrat 
svy: ologit intra_peer ideology 
svy: ologit intra_peer knowledge 
*predicting elite embarrassment
svy: ologit intra_elite age 
svy: ologit intra_elite ib1.woman 
svy: ologit intra_elite white 
svy: ologit intra_elite education 
svy: ologit intra_elite interest 
svy: ologit intra_elite strength 
svy: ologit intra_elite democrat 
svy: ologit intra_elite ideology 
svy: ologit intra_elite knowledge 

*table A1 (appendix)
*predicting general embarrassment, weighted
svy: ologit embarrassment age ib1.woman white education interest strength democrat ideology knowledge 
*predicting peer embarrassment
svy: ologit intra_peer age ib1.woman white education interest strength democrat ideology knowledge 
*predicting elite embarrassment
svy: ologit intra_elite age ib1.woman white education interest strength democrat
ideology knowledge

*table A2 (appendix)
*predicting general embarrassment, unweighted
ologit embarrassment age ib1.woman white education interest strength democrat ideology knowledge 
*predicting peer embarrassment, unweighted
ologit intra_peer age ib1.woman white education interest strength democrat ideology knowledge 
*predicting elite embarrassment, unweighted
ologit intra_elite age ib1.woman white education interest strength democrat ideology knowledge

*missing data
tab interest
tab ideology

*open ended responses
tab ucc110
